/*
 * @copyright fxsen <br/>
 * @date 2022/4/18 15:01 <br/>
 * @email <a href="mailto:fxsen@foxmail.com">
 * @author fxsen
 */
package com.fxsen.commons.sysmanager.core.service;

import com.fxsen.commons.core.base.common.service.ICommonService;
import com.fxsen.commons.sysmanager.core.entity.OperationLog;
import org.aspectj.lang.ProceedingJoinPoint;
import org.springframework.scheduling.annotation.Async;

import javax.servlet.http.HttpServletRequest;

/**
 * 操作日志服务接口
 * @author fxsen
 * @date 2022/4/18 15:01
 * @email <a href="mailto:fxsen@foxmail.com">
 */
public interface IOperationLogService extends ICommonService<OperationLog> {
    /**
    * 记录操作日志
    * @param operationUser 操作用户
    * @param name 日志名称
    * @param type 日志类型 0——登录，1——操作日志，2——异常日志
    * @param exMessage 异常信息
    * @param request 请求头
    * @param methodName 方法名称
    * @date 2022/4/24 16:06
    * @author fxsen <br/>
    * @email <a href="mailto:fxsen@foxmail.com">
    **/
    void recordOperationLog(String operationUser, String name, int type,String exMessage,HttpServletRequest request,String methodName);

    @Async
    void save(String username, String browser, String ip, ProceedingJoinPoint joinPoint, OperationLog log);
}
